import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class HomeItemPage extends StatefulWidget {

  @override
  _HomeItemPageState createState() => _HomeItemPageState();
}

class _HomeItemPageState extends State<HomeItemPage> {
  @override
  Widget build(BuildContext context) {
    return  Builder(builder: (BuildContext context){
      return Center(
        child: Column(
          children: <Widget>[
            FlatButton(
                onPressed: (){
                  ///打开左侧菜单
                  Scaffold.of(context).openDrawer();
                },
                child: Text("打开左滑菜单")
            ),
            FlatButton(
                onPressed: (){
                  ///打开左侧菜单
                  Scaffold.of(context).openEndDrawer();
                },
                child: Text("打开右滑菜单")
            ),
          ],
        ),
      );
    });
  }
}
